package com.fanghaoran.notes.util;

/**
 * @Author: win11
 * @Date: 2023/04/13/15:10
 * @Description: 常量类
 */
public class Constants {
    /**
     * 路径的method参数名
     */
    public static final String METHOD = "method";

    /**
     * 自动登录cookie名
     */
    public static final String AUTO_USER_PARAM = "autoUser";
    public static final String LOGIN_SESSION_PARAM = "user";
    public static final Integer UN_LOGIN = 401;

    /**
     * 用户
     */
    public static final Integer BUYER = 0;
    /**
     * 商家
     */
    public static final Integer SELLER = 1;


    /**
     * 根据订单数
     */
    public static final Integer ORDER_BY_SALES = 1;
    /**
     * 根据评分
     */
    public static final Integer ORDER_BY_SCORE = 2;


    /**
     * 敏感词汇标识
     */
    public static final Integer EXITS_SENSITIVE_WORDS=400;



    /**
     * 默认头像路径
     */
    public static final String DEFAULT_HEAD_PHOTO = "head_photo.jpg";
    /**
     * 是否含有文件信息的判断字符串
     */
    public static final String IS_FILE = "multipart/form-data";
    public static final String UPLOAD_DIRECTORY = "image";
    /**
     * 保存图片的本地文件路径
     */
    public static final String DEST = "E:\\IDEAcode\\PDD\\web\\image";
    /**
     * 图片格式
     */
    public static final String IMAGE_FORMAT = "png";


    //返回结果相关参数
    /**
     * 返回结果为空
     */
    public static final Integer EMPTY = 404;

    /**
     * 返回结果不为空
     */
    public static final Integer NONEMPTY = 200;
    /**
     * 操作失败,返回-1
     */
    public static final Integer FAIL = -1;
    /**
     * 操作成功,返回1
     */
    public static final Integer SUCCESS = 1;


    // 加密相关参数
    /**
     * 生成的唯一盐
     */
    public static final byte[] SALT = "0cG/ldL8wR1zwpyQ".getBytes();

    /**
     * 迭代次数
     */
    public static final Integer ITERATION_COUNT = 1000;


    //订单状态
    /**
     * 未付款
     */
    public static final Integer ORDER_UN_PAYED = 0;
    /**
     * 已付款未确认完成
     */
    public static final Integer ORDER_PAYED = 1;
    /**
     * 完成订单(确认收货)
     */
    public static final Integer ORDER_FINISHED = 2;

    //判断当前是不是购物车
    /**
     * 是
     */
    public static final Integer IS_CART = 1;
    /**
     * 不是
     */
    public static final Integer NOT_CART = 0;

    //判断邀请码是否有效
    /**
     * 有效
     */
    public static final Integer IS_VALID=1;
    /**
     * 无效
     */
    public static final Integer NON_VALID=-1;

    /**
     * 邀请码所包含的字符集
     */
    public static final String CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";

    /**
     * 邀请码长度
     */
    public static final Integer CODE_LENGTH = 20;

    /**
     * 静态页面
     */
    public static final String HTML="html";
    public static final String CSS="css";
    public static final String JS="js";
    public static final String IMAGE="image";
    public static final String FONT="font";

}
